 import store from "@/Vuex/store.js"

 export const checkPermi = (value) => {
   const all_permission = "*:*:*";
   const permissions = store.getters && store.getters.permissions
   if (value && Array.isArray(value) && value.length > 0) {
     const permissionFlag = value
     const hasPermissions = permissions.some(permission => {
       return all_permission === permission || permissionFlag.includes(permission) || permissionFlag.includes(all_permission)
     })
     return hasPermissions
   } else {
     throw new Error(`请设置操作权限标签值`)
   }
 }